var net = require('net')

var client = net.connect({ port: 8089 }, () => {
    console.log('connected to server')
    client.write('World!\r\n')
})

client.on('data', data => {
    console.log('client got data from server: ', data.toString())
    client.end()
})

client.on('end', () => {
    console.log('disconnected from server')
})